<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>demo</title>
  <script type="text/javascript" src="../vue.js"></script>
  <style>
    .all {
      background-color: blue;
      font-size: 20px;
      width: 100px;
      height: 100px;
    }

    .one {
      color: red;
    }

    .two {
      font-style: italic;
      line-height: 100px;
    }

    .three {
      font-weight: bolder;
      text-align: center;
    }

    .red {
      color: aqua;

    }
  </style>
</head>

<body>
  <div id="app">
    <div class="all" :class="{one,two}">last </div>
    <div class="three two" :style="style">second</div>
    <div class="all" :class="number">
      super
    </div>
  </div>
</body>
<script type="text/javascript">
  // 阻止弹出异常
  Vue.config.productionTip = false
  // 创建一个vue的实例化对象
  const vm = new Vue({
    // 容器名
    el: "#app",
    //数据
    data() {
      return {
        one: 'red',
        two: 'two',
        // 样式的绑定方法
        style: {
          color: 'red',
          width: '500px',
          height: '500px',
          backgroundColor: "blue"
        }
        ,
        s2: {
          backgroundColor: 'yellow'
        }
        , number: {
          two: true,
          one: true,
          three: true
        }
      }
    }
  })
</script>

</html>